import Vue from 'vue'
import Vuex from 'vuex'
import menu from './menu'
import theme from './theme'
import VuexPersistence from 'vuex-persist'

// 持久化储存
const vuexLocal = new VuexPersistence({
    storage: window.localStorage,
})

Vue.use(Vuex)
export default new Vuex.Store({
    plugins: [vuexLocal.plugin],
    modules: {
        menu,
        theme
    },
})